package com.demo.mvc.aop;

import lombok.extern.slf4j.Slf4j;
import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.*;
import org.springframework.stereotype.Component;

@Aspect
@Component
@Slf4j
public class AppLogHandler {
  @Pointcut("@annotation(com.demo.mvc.aop.AppLog)")
  public void doLog(){
  }

  @Before("doLog()")
  public void beforeRun(){
    log.info("Before AppLog 注解执行");
  }

  @After("doLog()")
  public void afterRun(){
    log.info("after AppLog 注解执行");
  }



}
